//! Header for the ICommand interfaceclass
#ifndef CDSLOTOPEN_H
#define CDSLOTOPEN_H

#include "ICommand.h"
#include "Stereo.h"

//! Concrete command to switch on devices
/*!
	This command closes the cd tray of its stereo device
	\class CDSlotOpen
	\author Thomas Pfeiffer
	\date 21.12.2012
*/
class CDSlotOpen : public ICommand {
public:

	//! CTor of the CDSlotOpen
	/*!
	The CTor sets the Device the command acts on.
	\param dev The device the command acts on.
	\throws std::exception in case dev is null
	*/
	CDSlotOpen(Stereo * dev);

	void Execute();
	
	void Undo();

private:
	Stereo * mDevice;
	OnOffState mLastState;
	CDState mLastCDState;
};

#endif